package com.itheima.stock.mapper;

import com.itheima.stock.pojo.domain.OutMarketDomain;
import com.itheima.stock.pojo.entity.StockOuterMarketIndexInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author 46035
 * @description 针对表【stock_outer_market_index_info(外盘详情信息表)】的数据库操作Mapper
 * @createDate 2022-09-19 15:48:56
 * @Entity com.itheima.stock.pojo.entity.StockOuterMarketIndexInfo
 */
public interface StockOuterMarketIndexInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockOuterMarketIndexInfo record);

    int insertSelective(StockOuterMarketIndexInfo record);

    StockOuterMarketIndexInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockOuterMarketIndexInfo record);

    int updateByPrimaryKey(StockOuterMarketIndexInfo record);

    /**
     * 获取外盘数据
     *
     * @return
     */
    List<OutMarketDomain> getOutMarketIndex(@Param("time") Date currentTime, @Param("outers") List<String> outer);

    /**
     * 插入外盘数据
     *
     * @param entities
     * @return
     */
    int insertBatch(@Param("infos") List<StockOuterMarketIndexInfo> entities);
}
